package com.tcm.smarthealth.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Schema(name = "HistoryItemResponse", description = "健康档案时间线记录")
public class HistoryItemResponse {

    @Schema(description = "记录 ID")
    private String id;

    @Schema(description = "记录类型：QUESTION/IMAGE", example = "QUESTION")
    private String type;

    @Schema(description = "标题", example = "中西结合 · 最近总是头晕乏力怎么办？")
    private String title;

    @Schema(description = "摘要信息")
    private String summary;

    @Schema(description = "标签")
    private List<String> tags;

    @Schema(description = "元数据（诊断、置信度等）")
    private Map<String, Object> metadata;

    @Schema(description = "记录时间", example = "2025-11-07 22:01:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime timestamp;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public List<String> getTags() {
        return tags;
    }

    public void setTags(List<String> tags) {
        this.tags = tags;
    }

    public Map<String, Object> getMetadata() {
        return metadata;
    }

    public void setMetadata(Map<String, Object> metadata) {
        this.metadata = metadata;
    }

    public LocalDateTime getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(LocalDateTime timestamp) {
        this.timestamp = timestamp;
    }
}

